package casbinRouter

import (
	"github.com/Sir-yuChen/funAnalyse/api"
	"github.com/Sir-yuChen/funAnalyse/global"
	"github.com/Sir-yuChen/funAnalyse/middleware"
	"github.com/gin-gonic/gin"
)

type StockCasbinRoleRelationResourcesRouter struct{}

func (co *StockCasbinRoleRelationResourcesRouter) StockCasbinRoleRelationResourcesApiRouter(Router *gin.RouterGroup) {
	commonJwtRouter := Router.Group(global.ROUTER_GROUP_CASBIN).Use(middleware.JWTAuth()).Use(middleware.CasbinMiddleware())
	api := api.ApiGroupApp.CasbinApiGroup.StockCasbinRoleRelationResourcesController
	{
		commonJwtRouter.GET(global.API_CASBIN_ROLE_RELATION_RESOURCES_GET.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_ROLE_RELATION_RESOURCES_GET), api.GetStockCasbinRoleRelationResources)
		commonJwtRouter.POST(global.API_CASBIN_ROLE_RELATION_RESOURCES_INSERT.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_ROLE_RELATION_RESOURCES_INSERT), api.InsertStockCasbinRoleRelationResources)
		commonJwtRouter.POST(global.API_CASBIN_ROLE_RELATION_RESOURCES_UPDATE.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_ROLE_RELATION_RESOURCES_UPDATE), api.UpdateStockCasbinRoleRelationResources)
		commonJwtRouter.GET(global.API_CASBIN_ROLE_RELATION_RESOURCES_DEL.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_ROLE_RELATION_RESOURCES_DEL), api.DelStockCasbinRoleRelationResources)
		commonJwtRouter.GET(global.API_CASBIN_ROLE_RESOURCES_ASSIGNING.BasePath, middleware.CheckApiResourcesMiddleware(global.API_CASBIN_ROLE_RESOURCES_ASSIGNING), api.AssigningResources)
	}
}
